package top.kaoshanji.r6ch13b;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests;
import org.testng.annotations.Test;

/**
 * @author kaoshanji
 * ^_^
 * create time 2025/5/11 17:48
 */
@ContextConfiguration(locations = { "classpath:r6ch13b/application-context.xml" })
public class ForumDaoTest extends AbstractTransactionalTestNGSpringContextTests {

    @Autowired
    private ForumDao forumDao;

    // 代码清单test-r6ch13b-01：测试一下DAO类里的JdbcTemplate
    // 看数据库里有没有t_user3，有的话，就删掉再运行
    @Test
    public void initDb() {
        forumDao.initDb();
    }

}
